import request from '@/config/axios'

// 生产计划-加餐记录 VO
export interface RecipeAddRecordVO {
  id: number // 主键
  flightNo: string // 航班号
  bussClassQty: number // 商务舱加餐数量
  premEcoClassQty: number // 高级经济舱加餐数量
  ecoClassQty: number // 经济舱加餐数量
  crewQty: number // 机组加餐数量
  recordDate: Date // 记录日期
}

// 生产计划-加餐记录 API
export const RecipeAddRecordApi = {
  // 查询生产计划-加餐记录分页
  getRecipeAddRecordPage: async (params: any) => {
    return await request.get({ url: `/pplan/recipe-add-record/page`, params })
  },

  // 查询生产计划-加餐记录详情
  getRecipeAddRecord: async (id: number) => {
    return await request.get({ url: `/pplan/recipe-add-record/get?id=` + id })
  },

  // 新增生产计划-加餐记录
  createRecipeAddRecord: async (data: RecipeAddRecordVO) => {
    return await request.post({ url: `/pplan/recipe-add-record/create`, data })
  },

  // 修改生产计划-加餐记录
  updateRecipeAddRecord: async (data: RecipeAddRecordVO) => {
    return await request.put({ url: `/pplan/recipe-add-record/update`, data })
  },

  // 删除生产计划-加餐记录
  deleteRecipeAddRecord: async (id: number) => {
    return await request.delete({ url: `/pplan/recipe-add-record/delete?id=` + id })
  },

  // 导出生产计划-加餐记录 Excel
  exportRecipeAddRecord: async (params) => {
    return await request.download({ url: `/pplan/recipe-add-record/export-excel`, params })
  }
}